<?php

ob_start();

?>
<!DOCTYPE html>
<html>
    <head>
        <title><?php echo $template['title']; ?></title>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
        <link rel="shortcut icon" href="<?php echo base_url(); ?>images/favicon.ico" type="image/x-icon" />
        <?php echo $template['partials']['styles']; ?>
        <?php echo $template['partials']['scripts_a']; ?>
    </head>
    <body>
        <?php
        
        echo $template['partials']['header'];
        
        if($this->session->userdata('username')) {
        echo $template['partials']['navigation'];
        }
        
        echo $template['partials']['subnav'];
        
        echo $template['body'];
        
        echo $template['partials']['footer'];
        
        echo $template['partials']['scripts_b'];
        ?>
    </body>
</html>
<?php ob_end_flush(); ?>